﻿using System.Collections.Generic;

namespace Grebok.Persistence
{
    using Grebok.Persistence.QueryModel;

    public interface IDataMapper<T>
    {
        /// <summary>
        /// Adds the given item to the database
        /// </summary>
        /// <param name="item">The item that's going to be added to the database</param>
        void Create(T item);
        void Update(T item);
        void Delete(T item);

        IList<T> GetAll();
        IList<T> GetByCriteria(Query query);

        T GetByKey(object key);
    }
}
